<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <h1>Welcome to MyWebsite!</h1>

  <h1>请求方法测试</h1>
  <!--表单只能提交get或post请求，再springmvc中，使用_method参数获取真正想要的请求方式-->
  <form action="/user" method="get">
      <input value="get请求" type="submit">
  </form>
  <form action="/user" method="post">
      <input value="post请求" type="submit">
  </form>
  <form action="/user" method="post">
      <input name="_method" type="hidden" value="DELETE">
      <input value="delete请求" type="submit">
  </form>
  <form action="/user" method="post">
      <input name="_method" type="hidden" value="PUT">
      <input value="put请求" type="submit">
  </form>

  <a href="car/3/owner/lisi?age=18&inters=basketball&inters=game">car/{id}/owner/{username}</a>

  <form action="/save" method="post">
      <P>获取RequestBody数据</P>
      用户名: <input name="userName"/>
      密码: <input name="password"/>
      <input type="submit" value="提交">
  </form>

  <h1>矩阵变量</h1>
  <a href="car/sell;low=30;brand=bmw,benz,audi">矩阵变量1</a>
  <a href="boss/1;age=30/2;age=20">矩阵变量2</a>

  <h1>自定义类型</h1>
  <form action="/saveuser" method="post">
      姓名: <input name="name" value="zhangsan"/>
      年龄: <input name="age" value="18"/>
      生日: <input name="birth" value="2019/12/10"/>
<!--      宠物姓名: <input name="pet.name" value="miao"/>-->
<!--      宠物年龄: <input name="pet.age" value="5"/>-->
      宠物: <input name="pet" value="miao,3"/>
      <input type="submit" value="保存"/>
  </form>
</body>
</html>